package com.igeekhome.wzgl.mapper;

import com.igeekhome.wzgl.entity.MaterialStorageEntity;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface IMaterialStorageMapper {
    @Select("select * from material_storage")
    List<MaterialStorageEntity> page();
    @Insert("insert into material_storage(number,title,material_type,create_time,creater) values (#{number},#{title},#{materialType},#{createTime},#{creater})")
    int insert(MaterialStorageEntity mz) ;
    @Delete("delete from material_storage where id = #{id}")
    int delete(int id);
    @Update("update material_storage set number=#{number},title=#{title},material_type=#{materialType},create_time=#{createTime},creater=#{creater} where id = #{id}")
    int update(MaterialStorageEntity mz);
    @Select("select id,number,title,material_type,create_time,creater from material_storage where id=#{id}")
    List<MaterialStorageEntity> select(int id);
    @Select("select id,number,title,material_type,create_time,creater from material_storage where id=#{id}")
    MaterialStorageEntity getById(int id);
}
